<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />

<div class="t_bar">
	经费信息
</div>

<table class="t_css" width="100%" border="0" cellpadding="0"
	cellspacing="1" id="fundInfo_from">
	<col style="width: 20%"/>
	<col style="width: 60%"/>
	<col style="width: 20%"/>
	<tr class="li_1">
		<td align="right"><span class="color_red">*</span>申请省补助（奖励）经费：</td>
		<td colspan="4">


		<input type="text"
			   name="proposal/research_all_subsidy_funds"
			   disabled="disabled" id="research_all_subsidy_funds"
			   value="<x:out select="$xmlData/data/proposal/research_all_subsidy_funds"/>"
			   class="gray required " onfocus="InitInput.setNumber(this,9,2,2)"
			   style="text-align: right; width: 80%" label="申请省补助（奖励）经费" />万元
	</tr>



	<tr class="li_1">
		<td align="right" rowspan="3">其中：</td>
		<td align="right">国内外科重点研院所、高校设立研发机构经费补助：</td>
		<td >
			<input type='text'  disabled="disabled" id="research_subsidy_funds" name='proposal/research_subsidy_funds' onchange="countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award','all_subsidy_funds')" onfocus="InitInput.setNumber(this,9,2,2)"  style="width: 75%;text-align: right" class="input_css  gray "  value='<x:out select="$xmlData/data/proposal/research_subsidy_funds"/>' label="其中-->国内外科重点研院所、高校设立研发机构经费补助">万元
		</td>
	</tr>

	<tr class="li_1">
		<td align="right">研发机构非财政支持研发经费补助：</td>
		<td >
			<input type='text' name='proposal/research_support_subsidy_funds'  disabled="disabled"
				   onfocus="InitInput.setNumber(this,9,2,2)"  style="width: 75%;text-align: right"
				   class="input_css  gray"  id="research_support_subsidy_funds"
				   value='<x:out select="$xmlData/data/proposal/research_support_subsidy_funds"/>'
				   label="其中-->研发机构非财政支持研发经费补助" 			onchange="countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award','all_subsidy_funds')" >万元
		</td>
	</tr>
	<tr class="li_1">
		<td align="right">研发机构在皖实施科技成果转化和产业化奖励：</td>
		<td >
			<input type='text'  disabled="disabled"  id="research_industrialization_award" name='proposal/research_industrialization_award' onchange="countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award','all_subsidy_funds')" onfocus="InitInput.setNumber(this,9,2,2)"  style="width: 75%;text-align: right" class="input_css   gray"  value='<x:out select="$xmlData/data/proposal/research_industrialization_award"/>' label="其中-->研发机构在皖实施科技成果转化和产业化奖励">万元
		</td>
	</tr>
	<tr class="li_1" >
		<td align="left" colspan="3"><strong>落户市2018年对国内外重点科研院所、高校设立研发机构资金支持额度（不含基本建设和固定资产投入补贴）</strong></td>
	</tr>
</table>

<%--<div class="t_bar">
	落户市2018年对大院大所设立研发机构资金支持额度（不含基本建设和固定资产投入补贴）
</div>--%>

<table  id="tblorg_szwj" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
	<thead >
	<tr style="border:1px solid #B7D1E6">
		<th class="TblHead" align="center"  width="5%">选择</th>
		<th class="TblHead" align="center"  width="5%">序号</th>
		<th class="TblHead" align="center"  width="15%">市财政补助文件名称</th>
		<th class="TblHead" align="center"  width="15%">文件号</th>
		<th class="TblHead" align="center"  width="25%">支持额度（万元)</th>
		<th class="TblHead" align="center"  width="35%">文件补助内容简述（不超过100字）</th>

	</tr>
	</thead>
	<tbody id="tab">
	<tr style="display:none">
		<td align="center">
			<input type="radio" style="border: 0px;background-color: white;" class="radiobutton" name="selorg_szwj" >
		</td>
		<td align="center">
			<span name="office_szwjs|office_szwj[0]@seq_no" >[index]</span>
		</td>

		<td align="center">
			<input  id="office_szwj_name_[0]" name="office_szwjs|office_szwj[0]|office_szwj_name" label="市财政补助文件名称" maxlength="50" value="" class=" required input_text" style="width:80%"  />
		</td>
		<td align="center">
			<input  id="office_szwj_number_[0]" name="office_szwjs|office_szwj[0]|office_szwj_number" label="文件号" maxlength="50" value="" class="  input_text" style="width:80%"  />
		</td>
		<td align="center">
			<input  id="office_szwj_quota_[0]" name="office_szwjs|office_szwj[0]|office_szwj_quota" label="支持额度"
					onchange="countFundAuto1();countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award','all_subsidy_funds')"
					onfocus="InitInput.setNumber(this,7,2,2)" value="" class=" required input_text" style="width:75%;text-align: right"  />
		</td>
		<td align="center">
			<input  id="office_szwj_sketch_[0]" name="office_szwjs|office_szwj[0]|office_szwj_sketch" label="文件补助内容简述" value="" maxlength="100" class=" required input_text" style="width:80%"  />
		</td>
	</tr>


	<c:set value="0" var="index" scope="page"/>
	<x:forEach select="$xmlData/data/office_szwjs/office_szwj" var="office_szwj">

		<c:choose>
			<c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
			<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
		</c:choose>
		<tr >
			<td align="center">
				<input type="radio" style="border: 0px;background-color: white;" class="radiobutton" name="selorg_szwj" >
			</td>
			<td align="center">
				<span   name="office_szwjs/office_szwj[${flag}${index}]@seq_no" ><x:out select="$office_szwj/@seq_no"/></span>
			</td>

			<td align="center">
				<input  id="office_szwj_name_[${flag}${index}]" name="office_szwjs/office_szwj[${flag}${index}]/office_szwj_name" label="市财政补助文件名称" maxlength="50" value="<x:out select="$office_szwj/office_szwj_name"/>" class=" required input_text" style="width:80%"  />
			</td>
			<td align="center">
				<input  id="office_szwj_number_[${flag}${index}]" name="office_szwjs/office_szwj[${flag}${index}]/office_szwj_number" label="文件号" maxlength="50" value="<x:out select="$office_szwj/office_szwj_number"/>" class="  input_text" style="width:80%"  />
			</td>
			<td align="center">
				<input  id="office_szwj_quota_[${flag}${index}]" name="office_szwjs/office_szwj[${flag}${index}]/office_szwj_quota"
						onchange="countFundAuto1();countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award','all_subsidy_funds')"
						label="支持额度" onfocus="InitInput.setNumber(this,7,2,2)" value="<x:out select="$office_szwj/office_szwj_quota"/>" class=" required input_text" style="width:75%;text-align: right"  />
			</td>
			<td align="center">
				<input  id="office_szwj_sketch_[${flag}${index}]" name="office_szwjs/office_szwj[${flag}${index}]/office_szwj_sketch" label="文件补助内容简述" value="<x:out select="$office_szwj/office_szwj_sketch"/>" maxlength="100" class=" required input_text" style="width:80%"  />
			</td>

		</tr>
		<c:set value="${index+1}" var="index" scope="page"/>
	</x:forEach>
	</tbody>
</table>

<table id="jbutton" width="98%" align="center" border="0" cellspacing="0" cellpadding="0" style="border:0;">
	<tr ><td>
		<input class="button_02" id="tianjia" name="cmdAddbefore" type=button value="添加" onclick="if(checkTabLimit('tblorg_szwj',3,'落户市2018年对国内外重点科研院所、高校设立研发机构资金支持额度信息最多只能填写3条')){addNewRow('tblorg_szwj');showDateTag('tblorg_szwj');}try{top.resizeFrame();}catch(e){};changeCss();getLen();countFundAuto1();countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award','all_subsidy_funds')">
		<input class="button_02" name="cmdMovePrev" type=button value="上移" onclick="movePrev('tblorg_szwj','selorg_szwj');changeCss();">
		<input class="button_02" name="cmdMoveNext" type=button value="下移" onclick="moveNext('tblorg_szwj','selorg_szwj');changeCss();">
		<input class="button_02" name="cmddel" type=button  value="删除" onclick="deleteSelectedRow('tblorg_szwj','落户市2018年对国内外重点科研院所、高校设立研发机构资金支持额度信息');changeCss();getLen();countFundAuto1();countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award','all_subsidy_funds')">
	</td></tr>
</table>


<table   cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
	<col style="width:5%"/>
	<col style="width:5%"/>
	<col style="width:15%"/>
	<col style="width:15%"/>
	<col style="width:25%"/>
	<col style="width:35%"/>
<tr class="li_1">
	<td align="left" colspan="5"><strong>研发机构2018年非财政经费支持的研发经费支出额度同比增量</strong></td>
	<td  align="center">
		<input type='text' id="quota_increment"    name='proposal/quota_increment' onchange="countFundAuto3();countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award','all_subsidy_funds')" onfocus="InitInput.setNumber(this,9,2,2)"  style="width: 73%;text-align: right" class="input_css  "  value='<x:out select="$xmlData/data/proposal/quota_increment"/>' label="研发机构2018年非财政经费支持的研发经费支出额度同比增量">万元
	</td>
</tr>
	<tr class="li_1">
		<td align="left" colspan="6"><strong>落户市2018年对研发机构在皖开展科技成果转化和产业化奖励资金</strong></td>
	</tr>
</table>

<table  id="tblorg_zwzj" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
	<thead >
	<tr style="border:1px solid #B7D1E6">
		<th class="TblHead" align="center"  width="5%">选择</th>
		<th class="TblHead" align="center"  width="5%">序号</th>

		<th class="TblHead" align="center"  width="15%">市财政补助文件名称</th>
		<th class="TblHead" align="center"  width="15%">文件号</th>
		<th class="TblHead" align="center"  width="25%">奖励资金（万元）</th>
		<th class="TblHead" align="center"  width="35%">文件补助内容简述（不超过100字）</th>
	</tr>
	</thead>
	<tbody id="tab1">
	<tr style="display:none">
		<td align="center">
			<input type="radio" style="border: 0px;background-color: white;" class="radiobutton" name="selorg_zwzj" >
		</td>
		<td align="center">
			<span name="office_zwzjs|office_zwzj[0]@seq_no" >[index]</span>
		</td>

		<td align="center">
			<input  id="office_zwzj_name_[0]" name="office_zwzjs|office_zwzj[0]|office_zwzj_name" label="市财政补助文件名称" maxlength="50" value="" class=" required input_text" style="width:80%"  />
		</td>
		<td align="center">
			<input  id="office_zwzj_number_[0]" name="office_zwzjs|office_zwzj[0]|office_zwzj_number" label="文件号" maxlength="50" value="" class="  input_text" style="width:80%"  />
		</td>
		<td align="center">
			<input  id="office_zwzj_quota_[0]" name="office_zwzjs|office_zwzj[0]|office_zwzj_quota"
					onchange="countFundAuto2();countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award','all_subsidy_funds')"		onfocus="InitInput.setNumber(this,7,2,2)" label="奖励资金" maxlength="9" value="" class=" required input_text" style="width:75%;text-align: right"  />
		</td>
		<td align="center">
			<input  id="office_zwzj_sketch_[0]" name="office_zwzjs|office_zwzj[0]|office_zwzj_sketch" label="文件补助内容简述" value="" maxlength="100" class=" required input_text" style="width:80%"  />
		</td>

	</tr>


	<c:set value="0" var="index" scope="page"/>
	<x:forEach select="$xmlData/data/office_zwzjs/office_zwzj" var="office_zwzj">

		<c:choose>
			<c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
			<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
		</c:choose>
		<tr >
			<td align="center">
				<input type="radio" style="border: 0px;background-color: white;" class="radiobutton" name="selorg_zwzj" >
			</td>
			<td align="center">
				<span   name="office_zwzjs/office_zwzj[${flag}${index}]@seq_no" ><x:out select="$office_zwzj/@seq_no"/></span>
			</td>

			<td align="center">
				<input  id="office_zwzj_name_[${flag}${index}]" name="office_zwzjs/office_zwzj[${flag}${index}]/office_zwzj_name" label="市财政补助文件名称" maxlength="50" value="<x:out select="$office_zwzj/office_zwzj_name"/>" class=" required input_text" style="width:80%"  />
			</td>
			<td align="center">
				<input  id="office_zwzj_number_[${flag}${index}]" name="office_zwzjs/office_zwzj[${flag}${index}]/office_zwzj_number" label="文件号" maxlength="50" value="<x:out select="$office_zwzj/office_zwzj_number"/>" class="  input_text" style="width:80%"  />
			</td>
			<td align="center">
				<input  id="office_zwzj_quota_[${flag}${index}]"
						onchange="countFundAuto2();countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award','all_subsidy_funds')" onfocus="InitInput.setNumber(this,7,2,2)" name="office_zwzjs/office_zwzj[${flag}${index}]/office_zwzj_quota" label="奖励资金" maxlength="50" value="<x:out select="$office_zwzj/office_zwzj_quota"/>" class=" required input_text" style="width:75%;text-align: right"  />
			</td>
			<td align="center">
				<input  id="office_zwzj_sketch_[${flag}${index}]" name="office_zwzjs/office_zwzj[${flag}${index}]/office_zwzj_sketch" label="文件补助内容简述" value="<x:out select="$office_zwzj/office_zwzj_sketch"/>" maxlength="100" class=" required input_text" style="width:80%"  />
			</td>

		</tr>
		<c:set value="${index+1}" var="index" scope="page"/>
	</x:forEach>
	</tbody>
</table>

<table id="jbutton" width="98%" align="center" border="0" cellspacing="0" cellpadding="0" style="border:0;">
	<tr ><td>
		<input class="button_02" id="tianjia" name="cmdAddbefore" type=button value="添加" onclick="if(checkTabLimit('tblorg_zwzj',3,'落户市2018年对研发机构在皖开展科技成果转化和产业化奖励资金信息最多只能填写3条')){addNewRow('tblorg_zwzj');showDateTag('tblorg_zwzj');}try{top.resizeFrame();}catch(e){};changeCss();getLen();countFundAuto2();countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award','all_subsidy_funds')">
		<input class="button_02" name="cmdMovePrev" type=button value="上移" onclick="movePrev('tblorg_zwzj','selorg_zwzj');changeCss();">
		<input class="button_02" name="cmdMoveNext" type=button value="下移" onclick="moveNext('tblorg_zwzj','selorg_zwzj');changeCss();">
		<input class="button_02" name="cmddel" type=button  value="删除" onclick="deleteSelectedRow('tblorg_zwzj','落户市2018年对研发机构在皖开展科技成果转化和产业化奖励资金信息');changeCss();getLen();countFundAuto2();countFundAuto('research_','subsidy_funds,support_subsidy_funds,industrialization_award','all_subsidy_funds')">
	</td></tr>
</table>


</table>


<script type="text/javascript">
	$(function() {
		changeCss();
		fileInit_1("tblMileStones1", "PDF", null, "{'PDF':'20480'}");
		$("#tblMileStones1").find(".file").hide();
	});
	function changeCss() {
		$("table.t_css").each(function() {
			$(this).find("tr:even").removeClass().addClass("li_1");
			$(this).find("tr:odd").removeClass().addClass("li_2");
		});
		changeCss1("fundInfo", "tblMileStones1");
	}
	function changeCss1(id1, id2) {
		if ($("#" + id1 + " tr:last").attr("class") == "li_1") {
			$("#" + id2 + " tr").removeClass("li_1").addClass("li_2");
		} else {
			$("#" + id2 + " tr").removeClass("li_2").addClass("li_1");
		}
	}

	function uploadfile(index, i) {
		if (2 == index) {
			$("#proof_file_data").click();

		} else
			$("#card_file").click();
	}
	/* function show(index){
	    $("#kepu").find("#proof_file"+index).show();
	} */
	function fileInit_1(tableId, type, width, validateJson) {
		var imgres = "";

		if (locale == "en_US") {
			imgres = "Upload_EN.gif";

		} else {
			imgres = "Upload_2.gif";

		}
		$("#" + tableId).find(":file").filestyle({
			image : res + "/images/" + imgres,
			imageheight : 25,
			imagewidth : 56,
			width : width
		});
		$("#" + tableId).find(":file").not("#filedata\\[0\\]").each(
				function(i) {
					$(this).change(
							function() {
								var str = $(this).attr("id");
								var index = str.charAt(str.length - 1);
								showFileName_1($(this), tableId, type,
										validateJson, index);
							});
				});
	}

	function showFileName_1(obj, tableId, type, validateJson, index) {
		var max = null;
		var fileTblId = null;// 文件列表的表格id

		fileTblId = tableId;
		var filedata = obj.val();
		if (filedata == '')
			return;
		else if (max != null && $.isNumeric(max) && fileTblId != null
				&& $("#" + fileTblId + " tr:gt(1)").length >= max) {
			var label = "";
			if ($("#" + fileTblId).attr("label") != null)
				label = $("#" + fileTblId).attr("label");

			scmWarn(label + messageTip.canNotUploadMoreThan + max
					+ messageTip.files1);
			return;
		} else {
			var fileName = filedata.substring(filedata.replace(/\\/g, '/')
					.lastIndexOf('/') + 1);
			var end = fileName.substring(fileName.lastIndexOf(".") + 1,
					fileName.length).toUpperCase();
			if (type.indexOf(end) < 0) {
				scmWarn(messageTip.pleaseUpload + type + messageTip.files2,
						"100px");
				return;
			}
		}

		$("#" + tableId + " .file").val(fileName);
		ajaxFileUpload_1(obj, "orgattach", tableId, type, max, validateJson,
				index);
	}

	function ajaxFileUpload_1(obj, type, tblId, filetype, max, validateJson,
			index) {
		irisAjaxFileUpload_1(obj, type, tblId, filetype, max, validateJson,
				index);
	}

	function uploadSuccess_1(obj, data, tableId, filetype, index) {
		$("#" + tableId).find("#file_code" + index).val(
				data[data.length - 1].fileCode);
		$("#" + tableId).find("#file_name" + index).text(
				data[data.length - 1].fileName);
		$("#" + tableId).find("#file_url" + index).attr("href",
				downloadPath + data[data.length - 1].fileCode);
		$("#proof_file" + index).show();
		$("#sy_delConent" + index).show();

		/*              var fileDate = $("#" + tableId).find("span[id='file_date'"+index+"]");// 上传时间对象
		 */
		var fileDate = $("#" + tableId).find("#file_date" + index);// 上传时间对象
		var nowTime = showLocale(new Date());
		fileDate.text(nowTime);
		$("#" + tableId).find("#" + index).show();
	}

	function irisAjaxFileUpload_1(obj, type, tableId, fileType, max,
			validateJson, index) {
		if (type == null || type == '') {
			scmWarn(messageTip.pleaseEnterTypeOfAttachment);
			return;
		}
		$("#" + tableId + " input[type='file']").not(obj).each(function() {
			this.outerHTML = this.outerHTML.replace(/(value=\").+\"/i, "$1\"");
		});

		prcWin.openWin();// 打开遮罩层
		$
				.ajaxFileUpload({
					url : ctx + '/file/ajax-fileupload',// 请求地址
					secureuri : false,// 一般设置为false
					fileElementId : 'filedata',// 文件的id属性
					limitSize : '10',// 允许上传的文件大小,单位M
					allowType : '',// 允许上传的文件类型.
					data : {
						'type' : type,
						'validateJson' : validateJson
					},
					tableId : tableId,// tableID
					dataType : 'json',// 返回值类型
					success : function(data, status) // 服务器成功响应处理函数
					{
						if (data.result == 'error') {
							scmWarn(data.msg);
						} else {

							uploadSuccess_1(obj, data, tableId, fileType, index);

							$("#" + tableId)
									.find(":file")
									.not("#filedata\\[0\\]")
									.each(
											function(i) {
												fileType = "JPG，PNG，DOC，WPS，DOCX，PDF，XLS，XLSX，TIFF，RAR";
												validateJson = "{'JPG':'20480','PNG':'20480','DOC':'20480','WPS':'20480','DOCX':'20480','PDF':'20480','XLS':'20480','XLSX':'20480','TIFF':'20480','RAR':'20480'}";
												$(this).unbind("change");
												$(this)
														.change(
																function() {
																	var str = $(
																			this)
																			.attr(
																					"id");
																	var index = str
																			.charAt(str.length - 1);
																	showFileName_1(
																			$(this),
																			tableId,
																			fileType,
																			validateJson,
																			index);
																});
											});
						}
						prcWin.closeWin();// 关闭遮罩层
					},
					error : function(data, status, e)// 服务器响应失败处理函数
					{
						$("#" + tableId + " input[type='file']").each(
								function(j) {
									this.outerHTML = this.outerHTML.replace(
											/(value=\").+\"/i, "$1\"");
								});

						$("#" + tableId)
								.find(":file")
								.not("#filedata\\[0\\]")
								.each(
										function(i) {
											fileType = "JPG，PNG，DOC，WPS，DOCX，PDF，XLS，XLSX，TIFF，RAR";
											validateJson = "{'JPG':'20480','PNG':'20480','DOC':'20480','WPS':'20480','DOCX':'20480','PDF':'20480','XLS':'20480','XLSX':'20480','TIFF':'20480','RAR':'20480'}";
											$(this).unbind("change");
											$(this)
													.change(
															function() {
																showFileName_1(
																		$(this),
																		"mainGoodsInfo",
																		fileType,
																		validateJson,
																		index);
															});
										});
						if (data && data.responseText && data.responseText.indexOf('413') > -1) {
				scmError("上传的文件超过限制大小！");
			} else {
				scmError(status);
			}
						prcWin.closeWin();// 关闭遮罩层
					},
					complete : function() {
						prcWin.closeWin();// 关闭遮罩层
					}
				});

	}
	 function countFundAuto(idStart, countStr, totalStr) {
 		var indexs = countStr.split(",");
 		var count = 0;
 		for ( var i = 0; i < indexs.length; i++) {
			//
			//var fund=$("input[id='idStart+indexs[i]']").val();
 			var fund = $("#" + idStart+ indexs[i]).val();
 			if (!$.isNumeric(fund))
 				fund = "0";
 			count = ((parseFloat(count)*10000 + parseFloat(fund)*10000)/10000).toFixed(4);
 			
 		}
 		
 		
 		count = formatNumberAuto(count.toString(), 9, 4, 2);// 格式化金额
 		
 		//add by cg 扩展：对于多个输入框所求得的和，同时赋给某几个文本框
 		var totalStrArr = totalStr.split(",");
 		var totalId;
 		for(var i = 0;i < totalStrArr.length; i++ ) {
 			totalId = totalStrArr[i];
 		
 		$("#" + idStart + totalId).val(count);
 		}
 	}
	function delContent_1(tableId, index) {
		if (confirm("你确定要删除该附件？")) {
			/* $("#" + tableId).find("input[id='file_code']").val("");// 清空文件名
			$("#" + tableId).find("span[id='file_date']").text("");// 清空文件code
			$("#" + tableId).find("span[id='file_name']").text("");// 清空文件上传日期
			$("#"+tableId).find("#proof_content").hide(); */

			$("#" + tableId).find("#file_code" + index).val("");// 清空文件名
			$("#" + tableId).find("#file_date" + index).text("");// 清空文件code
			$("#" + tableId).find("#file_name" + index).text("");// 清空文件上传日期
			$("#" + tableId).find("#proof_content" + index).hide();

			$("#sy_delConent" + index).hide();
			$("#file" + index).val("");
			$("#proof_file" + index).hide();

			/* $("#" + tableId).find("#proof_file"+index).hide(); */

		}
	}

	function countFundAuto1() {


		var ta1 =parseFloat($("input[id='office_szwj_quota_[00]']").val());

		var ta2 =parseFloat($("input[id='office_szwj_quota_[01]']").val());
		var ta3 =parseFloat($("input[id='office_szwj_quota_[02]']").val());
		if (!$.isNumeric(ta1) ){
			ta1 = 0;}
		if (!$.isNumeric(ta2) ){
			ta2 = 0;}
		if (!$.isNumeric(ta3) ){
			ta3 = 0;}
		//var ta4 =(ta1+ta2+ta3)*0.1;

		ta4 = ((parseFloat(ta1)*10000 + parseFloat(ta2)*10000 + parseFloat(ta3)*10000)/100000).toFixed(4);
		//ta5 = ((parseFloat(ta4)*10000)/10000).toFixed(4);

	     //var ta5=parseFloat(ta4.toFixed(4));


		ta6 = formatNumberAuto(ta4.toString(), 9, 4, 2);
		//var ta =ta6*0.1;

		if(ta6>10000){
			$("#research_subsidy_funds").val('10000.00');
		}else{
			$("#research_subsidy_funds").val(ta6);

		}

	}
	/*function countFundAuto1() {
		countCols("tblorg_szwj" ,'office_szwj_quota' ,'research_subsidy_funds');
	}*/
	function countFundAuto2() {
		//parseFloat(fund)*10000)/10000).toFixed(4)
		var ta1 =parseFloat($("input[id='office_zwzj_quota_[00]']").val());

		var ta2 =parseFloat($("input[id='office_zwzj_quota_[01]']").val());
		var ta3 =parseFloat($("input[id='office_zwzj_quota_[02]']").val());
		if (!$.isNumeric(ta1) ){
			ta1 = 0;}
		if (!$.isNumeric(ta2) ){
			ta2 = 0;}
		if (!$.isNumeric(ta3) ){
			ta3 = 0;}
		//var ta4 =(ta1+ta2+ta3)*0.1;
		//ta5 = ((parseFloat(ta4)*10000)/10000).toFixed(4);
		ta4 = ((parseFloat(ta1)*10000 + parseFloat(ta2)*10000 + parseFloat(ta3)*10000)/100000).toFixed(4);

		//var ta5 =$("#office_szwj_quota").val(ta4)*0.1;
		ta6 = formatNumberAuto(ta4.toString(), 9, 4, 2);
		//var ta =ta6*0.1;

		if(ta6>500){
			$("#research_industrialization_award").val('500.00');
		}else{
			$("#research_industrialization_award").val(ta6);

		}

	}
	function countFundAuto3() {
		//parseFloat(fund)*10000)/10000).toFixed(4)
		var ta1 =parseFloat($("input[id='quota_increment']").val());

		if (!$.isNumeric(ta1) ){
			ta1 = 0;}
	//	ta4 = ((parseFloat(ta1)*10000 + parseFloat(ta2)*10000 + parseFloat(ta3)*10000)/100000).toFixed(4);

		//var ta4 =(ta1)*0.1;
		ta5 = ((parseFloat(ta1)*10000)/100000).toFixed(4);
		//var ta5 =$("#office_szwj_quota").val(ta4)*0.1;
		ta6 = formatNumberAuto(ta5.toString(), 9, 4, 2);
		//var ta =ta6*0.1;

		if(ta6>1000){
			$("#research_support_subsidy_funds").val('1000.00');

		}else{
			$("#research_support_subsidy_funds").val(ta6);

		}

	}
	function countCols(id, colNameSuffix , countId) {
		var tableObj = document.getElementById(id) ;
		var trObj;
		var total = 0;
		var colValue;
		for (var i = tableObj.rows.length - 1; i > 1; i--)
		{
			trObj = tableObj.rows[i];
			colValue = $(trObj).find("span[name$='office_szwj_quota']").text();
			if(!!colValue) {
				total += parseInt(colValue);
			}
		}
		$("#" + countId).val(total);
	}
</script>